<script lang="ts" setup>
import {ref} from "vue";

interface Emits {
  (e: 'search', keyword: string): void;
}

const keyword = ref<string>()
const emits = defineEmits<Emits>()
const onSearch = (value: string) => {
  emits('search', value)
}
</script>

<template>
  <view class="search-item">
    <u-search v-model="keyword" :animation="true" :show-action="true" actionText="搜索" bgColor="rgb(246, 246, 246)"
              height="50" @click="onSearch" @search="onSearch"></u-search>
  </view>
</template>

<style lang="scss" scoped>
@import "custom-search.scss";
</style>